﻿using Arim.S4.Api;
using Arim.S4.Client.Base.Dto;
using System.Collections.Generic;

namespace Arim.S4.Client.Service
{
    public class IronBagAppService : BaseAppService<IronBagDto>
    {
        protected RestApi<IronBagMergeDto> mergeApi;
        public IronBagAppService() : base(Urls.IRON_BAGS.BASE)
        {
            this.mergeApi = new RestApi<IronBagMergeDto>();
        }

        /// <summary>
        /// 获取某个炉次的铁水并包情况。
        /// </summary>
        /// <param name="heatNo"></param>
        /// <returns></returns>
        public IList<IronBagMergeDto> GetHeatIronBags(string heatNo)
        {
            return this.mergeApi.GetAll(string.Format(Urls.IRON_BAGS.MERGE, heatNo));
        }

        /// <summary>
        /// 获取某个铁水包的使用情况。
        /// </summary>
        /// <param name="heatNo"></param>
        /// <returns></returns>
        public IList<IronBagDto> GetHotUsages(string hotNo)
        {
            return this.GetAll(string.Format(Urls.IRON_BAGS.MERGE, hotNo));
        }
    }
}
